<html>
<head><meta charset="utf-8"><title>query keys ... · t-compiler/wg-self-profile · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/index.html">t-compiler/wg-self-profile</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html">query keys ...</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="178863377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178863377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178863377">(Oct 23 2019 at 15:10)</a>:</h4>
<p>I've been looking into implementing query key recording a little more concretely just now and it seems that my initial plan does not quite work <span aria-label="grumpy" class="emoji emoji-1f621" role="img" title="grumpy">:grumpy:</span></p>



<a name="178863480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178863480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178863480">(Oct 23 2019 at 15:11)</a>:</h4>
<p>I planned to use the <code>DepNodeIndex</code> corresponding to each query invocation as the <code>StringId</code> for which we'd then allocate string representations of the keys in bulk</p>



<a name="178863574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178863574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178863574">(Oct 23 2019 at 15:12)</a>:</h4>
<p>this is nice because it allows to also have query keys on dep-tracking events (once we add them) without additional overhead</p>



<a name="178863634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178863634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178863634">(Oct 23 2019 at 15:13)</a>:</h4>
<p>BUT: it turns out that the <code>DepNodeIndex</code> for a given query invocation is assigned only <em>after</em> the query provider has finished</p>



<a name="178863668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178863668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178863668">(Oct 23 2019 at 15:13)</a>:</h4>
<p>while we obviously want to start recording <em>before</em> invoking the query provider</p>



<a name="178863734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178863734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178863734">(Oct 23 2019 at 15:14)</a>:</h4>
<p>so we don't know which StringId to stick into the start event</p>



<a name="178863801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178863801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178863801">(Oct 23 2019 at 15:14)</a>:</h4>
<p>But we'd have the data when we go to record the end event?</p>



<a name="178863851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178863851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178863851">(Oct 23 2019 at 15:15)</a>:</h4>
<p>yes</p>



<a name="178863877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178863877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178863877">(Oct 23 2019 at 15:15)</a>:</h4>
<p>I mean we already depend heavily on the start/stop events being balanced...</p>



<a name="178863969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178863969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178863969">(Oct 23 2019 at 15:16)</a>:</h4>
<p>yes, it has been suggested in the past to have only one (start, end) event</p>



<a name="178863980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178863980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178863980">(Oct 23 2019 at 15:16)</a>:</h4>
<p>instead of two events</p>



<a name="178864002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864002">(Oct 23 2019 at 15:16)</a>:</h4>
<p>that would solve the problem and also use less space</p>



<a name="178864041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864041">(Oct 23 2019 at 15:17)</a>:</h4>
<p>the only problem I see with that is event nesting</p>



<a name="178864106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864106">(Oct 23 2019 at 15:17)</a>:</h4>
<p>i.e. we want to be able to reconstruct "event stacks"</p>



<a name="178864166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864166">(Oct 23 2019 at 15:18)</a>:</h4>
<p>and solely relying on time-stamps might not quite work (right?)</p>



<a name="178864216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864216">(Oct 23 2019 at 15:18)</a>:</h4>
<p>I think it should because <code>libstd</code> has been patched to force monotonic clocks</p>



<a name="178864252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864252">(Oct 23 2019 at 15:19)</a>:</h4>
<p>it has?</p>



<a name="178864266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864266">(Oct 23 2019 at 15:19)</a>:</h4>
<p>Yeah</p>



<a name="178864268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864268">(Oct 23 2019 at 15:19)</a>:</h4>
<p>it might just work then :)</p>



<a name="178864272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864272">(Oct 23 2019 at 15:19)</a>:</h4>
<p>Pretty sure</p>



<a name="178864281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864281">(Oct 23 2019 at 15:19)</a>:</h4>
<p>/me looking</p>



<a name="178864290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864290">(Oct 23 2019 at 15:19)</a>:</h4>
<p>I remember the issue but not the outcome</p>



<a name="178864438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864438">(Oct 23 2019 at 15:20)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/56988" target="_blank" title="https://github.com/rust-lang/rust/pull/56988">https://github.com/rust-lang/rust/pull/56988</a></p>



<a name="178864517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864517">(Oct 23 2019 at 15:21)</a>:</h4>
<p>(wow 2018... time flies)</p>



<a name="178864656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864656">(Oct 23 2019 at 15:23)</a>:</h4>
<p>well only if you're x86_64-linux, otherwise it just jumps forward sporadically :)</p>



<a name="178864791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864791">(Oct 23 2019 at 15:24)</a>:</h4>
<p><span aria-label="joy" class="emoji emoji-1f602" role="img" title="joy">:joy:</span></p>



<a name="178864850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864850">(Oct 23 2019 at 15:25)</a>:</h4>
<p>alright, so I guess I'll take a stab at implementing the single-event approach?</p>



<a name="178864885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864885">(Oct 23 2019 at 15:25)</a>:</h4>
<p>I guess you're going to need to mess with the <code>RawEvent</code> layout?</p>



<a name="178864898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864898">(Oct 23 2019 at 15:25)</a>:</h4>
<p>it will mean updating quite a few of the tools</p>



<a name="178864936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864936">(Oct 23 2019 at 15:26)</a>:</h4>
<p>I'm not sure if we can retain the iterator interface</p>



<a name="178864996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178864996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178864996">(Oct 23 2019 at 15:26)</a>:</h4>
<p>I think most of them actually use <code>iter_matching_events()</code> so it probably won't be that bad</p>



<a name="178865010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865010">(Oct 23 2019 at 15:26)</a>:</h4>
<p>that's true</p>



<a name="178865032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865032">(Oct 23 2019 at 15:26)</a>:</h4>
<p>I mean, I'm sure we <em>could</em>  retain the interface</p>



<a name="178865056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865056">(Oct 23 2019 at 15:26)</a>:</h4>
<p>I'm not sure we want to</p>



<a name="178865091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865091">(Oct 23 2019 at 15:27)</a>:</h4>
<p>I think it's mostly going to be the same as what we already have if I understand what you want to do correctly</p>



<a name="178865249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865249">(Oct 23 2019 at 15:28)</a>:</h4>
<p>well, <code>Event</code> has distinct <code>start</code> and <code>end</code> events</p>



<a name="178865256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865256">(Oct 23 2019 at 15:28)</a>:</h4>
<p>Well I guess I'm thinking primary of the stuff that already uses <code>MatchingEvent</code></p>



<a name="178865270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865270">(Oct 23 2019 at 15:28)</a>:</h4>
<p>while the new <code>RawEvent</code> would not have those</p>



<a name="178865281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865281">(Oct 23 2019 at 15:28)</a>:</h4>
<p>Yeah</p>



<a name="178865295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865295">(Oct 23 2019 at 15:29)</a>:</h4>
<p>we could emulate the old behavior</p>



<a name="178865333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865333">(Oct 23 2019 at 15:29)</a>:</h4>
<p>but that would mean reading the entire event stream into memory</p>



<a name="178865348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865348">(Oct 23 2019 at 15:29)</a>:</h4>
<p>I think the new design might actually simplify <code>summarize</code></p>



<a name="178865362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865362">(Oct 23 2019 at 15:29)</a>:</h4>
<p>We do that already</p>



<a name="178865377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865377">(Oct 23 2019 at 15:29)</a>:</h4>
<p><code>MatchingEvent</code> would not be affect much, probably</p>



<a name="178865378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865378">(Oct 23 2019 at 15:29)</a>:</h4>
<p>(I'm pretty sure)</p>



<a name="178865431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865431">(Oct 23 2019 at 15:30)</a>:</h4>
<p>so, yeah</p>



<a name="178865484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865484">(Oct 23 2019 at 15:30)</a>:</h4>
<p>I'll do some experimentation and show the result to you</p>



<a name="178865504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865504">(Oct 23 2019 at 15:30)</a>:</h4>
<p>Ok</p>



<a name="178865509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865509">(Oct 23 2019 at 15:30)</a>:</h4>
<p>and then we can discuss further</p>



<a name="178865520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865520">(Oct 23 2019 at 15:30)</a>:</h4>
<p>it might be simpler than I thought</p>



<a name="178865521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865521">(Oct 23 2019 at 15:30)</a>:</h4>
<p>I think <code>summarize</code> is really the only thing that's going to be invasive to change</p>



<a name="178865547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865547">(Oct 23 2019 at 15:31)</a>:</h4>
<p>yeah</p>



<a name="178865570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865570">(Oct 23 2019 at 15:31)</a>:</h4>
<p>And I think this may actually be good. The new approach lends pretty naturally to breaking the problem apart into a few discrete steps instead of mixing everything together in a massive loop</p>



<a name="178865624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865624">(Oct 23 2019 at 15:31)</a>:</h4>
<p>yeah</p>



<a name="178865677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865677">(Oct 23 2019 at 15:32)</a>:</h4>
<p>I guess flamegraphs will be affected too?</p>



<a name="178865683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865683">(Oct 23 2019 at 15:32)</a>:</h4>
<p>they need the nesting information</p>



<a name="178865716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865716">(Oct 23 2019 at 15:32)</a>:</h4>
<p>Yeah</p>



<a name="178865767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865767">(Oct 23 2019 at 15:33)</a>:</h4>
<p>eddyb had a few thoughts they mentioned to me the other day about <code>RawEvent</code>, let me go find those in discord</p>



<a name="178865854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865854">(Oct 23 2019 at 15:34)</a>:</h4>
<blockquote>
<p>why are these two separate things? <a href="https://github.com/rust-lang/measureme/blob/d6440835f30cdc6cfbe8953711bcd7e703e98c79/measureme/src/raw_event.rs#L39-L40" target="_blank" title="https://github.com/rust-lang/measureme/blob/d6440835f30cdc6cfbe8953711bcd7e703e98c79/measureme/src/raw_event.rs#L39-L40">https://github.com/rust-lang/measureme/blob/d6440835f30cdc6cfbe8953711bcd7e703e98c79/measureme/src/raw_event.rs#L39-L40</a><br>
if you merged them somehow and made thread_id just u32 then the whole thing would be 16 bytes<br>
which you can divide a mmap page into<br>
so now you get to write the entire record with one instruction on x86_64</p>
</blockquote>



<a name="178865875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865875">(Oct 23 2019 at 15:34)</a>:</h4>
<p>AFAIK, we don't actually use <code>event_kind</code> at all</p>



<a name="178865883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178865883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178865883">(Oct 23 2019 at 15:34)</a>:</h4>
<p>So we could drop that field "for free"</p>



<a name="178866072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866072">(Oct 23 2019 at 15:36)</a>:</h4>
<p>yeah, maybe</p>



<a name="178866100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866100">(Oct 23 2019 at 15:37)</a>:</h4>
<p>I'll try to reconstruct our reasoning for having two distinct fields</p>



<a name="178866124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866124">(Oct 23 2019 at 15:37)</a>:</h4>
<p>originally we had the 'high-level' summary thing</p>



<a name="178866144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866144">(Oct 23 2019 at 15:37)</a>:</h4>
<p>which just lumped everything together under really broad categories</p>



<a name="178866164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866164">(Oct 23 2019 at 15:38)</a>:</h4>
<p>but that wasn't detailed enough so we made it per query and left the categories alone</p>



<a name="178866287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866287">(Oct 23 2019 at 15:38)</a>:</h4>
<p>so you did <code>-Zself-profile</code> and got the high-level thing and if you added a <code>-v</code> on to it, you got the queries</p>



<a name="178866315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866315">(Oct 23 2019 at 15:39)</a>:</h4>
<p>but everybody that wanted to use the tool ended up doing that anyway so it just became the default</p>



<a name="178866351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866351">(Oct 23 2019 at 15:39)</a>:</h4>
<p>and we never actually implemented anything in <code>measureme</code> to handle <code>event_kind</code></p>



<a name="178866361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866361">(Oct 23 2019 at 15:39)</a>:</h4>
<p>right now we are using the <code>event_kind</code> to distinguish between generic activities vs queries etc</p>



<a name="178866488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866488">(Oct 23 2019 at 15:40)</a>:</h4>
<p>ah, you're right</p>



<a name="178866535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866535">(Oct 23 2019 at 15:41)</a>:</h4>
<p>one could lump that into the string contents of the event-id</p>



<a name="178866706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866706">(Oct 23 2019 at 15:42)</a>:</h4>
<p>for query keys I already planned to make event-id conform to some simple grammar</p>



<a name="178866733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866733">(Oct 23 2019 at 15:42)</a>:</h4>
<p>Actually, it's just query/activity vs incremental load time vs blocked time</p>



<a name="178866744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866744">(Oct 23 2019 at 15:42)</a>:</h4>
<p>so that query-name and query-key can reliably be parsed out</p>



<a name="178866766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866766">(Oct 23 2019 at 15:43)</a>:</h4>
<p>This is the only place I found we actually use it <a href="https://github.com/rust-lang/measureme/blob/34792560521a30030b2949b2c9dce881dea77852/summarize/src/analysis.rs#L84" target="_blank" title="https://github.com/rust-lang/measureme/blob/34792560521a30030b2949b2c9dce881dea77852/summarize/src/analysis.rs#L84">https://github.com/rust-lang/measureme/blob/34792560521a30030b2949b2c9dce881dea77852/summarize/src/analysis.rs#L84</a></p>



<a name="178866806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866806">(Oct 23 2019 at 15:43)</a>:</h4>
<p>it is useful information, I'd say</p>



<a name="178866810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866810">(Oct 23 2019 at 15:43)</a>:</h4>
<p>Yeah</p>



<a name="178866876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866876">(Oct 23 2019 at 15:44)</a>:</h4>
<blockquote>
<p>for query keys I already planned to make event-id conform to some simple grammar</p>
</blockquote>
<p>This is a really good idea!</p>



<a name="178866879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866879">(Oct 23 2019 at 15:44)</a>:</h4>
<p>but it could all be in one string, that's also true</p>



<a name="178866956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178866956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178866956">(Oct 23 2019 at 15:44)</a>:</h4>
<p>so if we already make the event-id complex in order to support query keys, we might as well add the event-kind to that too</p>



<a name="178867004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178867004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178867004">(Oct 23 2019 at 15:45)</a>:</h4>
<p>We're not currently using this stuff IIRC </p>
<p><a href="https://github.com/rust-lang/measureme/blob/c8c27a9b17db7c863d4d59ecdbc26f3df20e2787/measureme/src/stringtable.rs#L7" target="_blank" title="https://github.com/rust-lang/measureme/blob/c8c27a9b17db7c863d4d59ecdbc26f3df20e2787/measureme/src/stringtable.rs#L7">https://github.com/rust-lang/measureme/blob/c8c27a9b17db7c863d4d59ecdbc26f3df20e2787/measureme/src/stringtable.rs#L7</a></p>



<a name="178867046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178867046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178867046">(Oct 23 2019 at 15:45)</a>:</h4>
<p>yes, that will be sorely needed soon though :)</p>



<a name="178867069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178867069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178867069">(Oct 23 2019 at 15:46)</a>:</h4>
<p>otherwise we'd replicate the query-names a billion times</p>



<a name="178867121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178867121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178867121">(Oct 23 2019 at 15:46)</a>:</h4>
<p>You could use it for the query key grammar as well</p>



<a name="178867144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178867144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178867144">(Oct 23 2019 at 15:46)</a>:</h4>
<p>yes, that's what I planned to use it for</p>



<a name="178867353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178867353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178867353">(Oct 23 2019 at 15:48)</a>:</h4>
<p>If there's anything I can do to help, feel free to ping me :)</p>



<a name="178867395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178867395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178867395">(Oct 23 2019 at 15:48)</a>:</h4>
<p>will do :)</p>



<a name="178941107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178941107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178941107">(Oct 24 2019 at 11:10)</a>:</h4>
<p>so, I started looking into this and it turns out that this works best if we do a number of refactorings (that we wanted to do anyway) first</p>



<a name="178941160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178941160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178941160">(Oct 24 2019 at 11:10)</a>:</h4>
<ol>
<li>move the RAII based API into measureme itself (i.e. the TimingGuard stuff)</li>
</ol>



<a name="178941194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178941194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178941194">(Oct 24 2019 at 11:11)</a>:</h4>
<p>this just works better with only having a single event at the end because you need to remember the starting time somewhere</p>



<a name="178941272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178941272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178941272">(Oct 24 2019 at 11:12)</a>:</h4>
<p>well, it looks like this is the main thing that should be done :)</p>



<a name="178941339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178941339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178941339">(Oct 24 2019 at 11:14)</a>:</h4>
<p>other nice-to-have things that I'll also do: </p>
<ul>
<li>make thread-id a u32</li>
<li>make measureme compute the thread-id (not sure about this one)</li>
</ul>



<a name="178946893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178946893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178946893">(Oct 24 2019 at 12:36)</a>:</h4>
<p>for some context: once <a href="https://github.com/rust-lang/measureme/pull/70" target="_blank" title="https://github.com/rust-lang/measureme/pull/70">https://github.com/rust-lang/measureme/pull/70</a> lands, I plan to immediately follow up with a rustc PR that uses 0.4.0 because it's straightforward and makes the code a bit cleaner in rustc. That should not require any changes to perf.rlo.</p>



<a name="178946952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178946952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178946952">(Oct 24 2019 at 12:37)</a>:</h4>
<p>the rest of the refactoring might take a little longer (a few days maybe) so it would be nice to land the improvements in the meantime.</p>



<a name="178946989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178946989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178946989">(Oct 24 2019 at 12:37)</a>:</h4>
<p>Alternatively we could not land anything just yet and wait for the refactoring to be completed. That would also be fine with me.</p>



<a name="178947127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/178947127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#178947127">(Oct 24 2019 at 12:39)</a>:</h4>
<p>I think we should land things as we go</p>



<a name="179526924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/179526924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#179526924">(Oct 31 2019 at 12:40)</a>:</h4>
<p>I'm in the middle after refactoring events from start+stop to single interval events, and it's going fine so far.</p>



<a name="179526939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/179526939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#179526939">(Oct 31 2019 at 12:40)</a>:</h4>
<p>I'm trying update <code>summarize</code> right now. Do we have test cases for that somewhere?</p>



<a name="179526967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/179526967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#179526967">(Oct 31 2019 at 12:41)</a>:</h4>
<p>Or did we have plans on how to add test cases for it?</p>



<a name="179527007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/179527007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#179527007">(Oct 31 2019 at 12:41)</a>:</h4>
<p>^ <span class="user-mention" data-user-id="125250">@Wesley Wiser</span></p>



<a name="179527112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/179527112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#179527112">(Oct 31 2019 at 12:42)</a>:</h4>
<p>I seem to remember chatting about a text format that could be converted into a raw event stream, that would then be used for having tests with predictable time stamps</p>



<a name="179527244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/179527244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#179527244">(Oct 31 2019 at 12:44)</a>:</h4>
<p>A "builder" type that takes care of creating raw event streams for testing might be event better.</p>



<a name="179527270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/179527270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#179527270">(Oct 31 2019 at 12:44)</a>:</h4>
<p>because then we can have unit tests more easily and don't need to write a parser</p>



<a name="179527587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/179527587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#179527587">(Oct 31 2019 at 12:49)</a>:</h4>
<p>I think I need to add test cases <em>before</em> doing the refactoring, at least for <code>summarize</code>...</p>



<a name="179528020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/179528020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#179528020">(Oct 31 2019 at 12:54)</a>:</h4>
<p>(in case anyone is interested, my changes so far can be found at <a href="https://github.com/michaelwoerister/measureme/tree/interval-events-refactoring" target="_blank" title="https://github.com/michaelwoerister/measureme/tree/interval-events-refactoring">https://github.com/michaelwoerister/measureme/tree/interval-events-refactoring</a>)</p>



<a name="179529411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/179529411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#179529411">(Oct 31 2019 at 13:11)</a>:</h4>
<blockquote>
<p>I seem to remember chatting about a text format that could be converted into a raw event stream, that would then be used for having tests with predictable time stamps</p>
</blockquote>
<p>I vaguely remember talking about this <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span> </p>
<blockquote>
<p>A "builder" type that takes care of creating raw event streams for testing might be event better.</p>
</blockquote>
<p>This sounds really good! I like this idea a lot</p>



<a name="179529920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/179529920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#179529920">(Oct 31 2019 at 13:18)</a>:</h4>
<p>I'll probably look into that tomorrow</p>



<a name="182970637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/182970637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#182970637">(Dec 09 2019 at 16:06)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="1123">@WG-self-profile</span> we are getting close <code>:)</code></p>
<p><a href="https://github.com/michaelwoerister/rust/commit/8f38d4c1e2013a29fbd32659b7338ebe80ff7ea9" target="_blank" title="https://github.com/michaelwoerister/rust/commit/8f38d4c1e2013a29fbd32659b7338ebe80ff7ea9">This commit</a> switches <code>rustc</code> to the new strategy for mapping event_ids to strings. It only needs a small patch on top of <a href="https://github.com/rust-lang/measureme/pull/98" target="_blank" title="https://github.com/rust-lang/measureme/pull/98">https://github.com/rust-lang/measureme/pull/98</a> in order to work. With that strategy in place it's just a matter of efficiently allocating string representations for query-keys in the <code>allocate_string_ids()</code> method. I'm pleased that things are not becoming overly complicated so far <code>:D</code></p>



<a name="182971005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/182971005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#182971005">(Dec 09 2019 at 16:09)</a>:</h4>
<p>This is really exciting! Great work <span class="user-mention" data-user-id="124287">@mw</span>!!</p>



<a name="183651103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651103">(Dec 17 2019 at 14:09)</a>:</h4>
<p>Alright, I guess this works, for some definition of "works": <a href="https://github.com/michaelwoerister/rust/tree/query-keys-in-self-profiling" target="_blank" title="https://github.com/michaelwoerister/rust/tree/query-keys-in-self-profiling">https://github.com/michaelwoerister/rust/tree/query-keys-in-self-profiling</a></p>



<a name="183651172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651172">(Dec 17 2019 at 14:10)</a>:</h4>
<p>There has been little testing and the way query keys are generated is very crude</p>



<a name="183651195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651195">(Dec 17 2019 at 14:10)</a>:</h4>
<p>but it compiles cargo and generates 1.2 GB of data for the whole crate graph :)</p>



<a name="183651216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651216">(Dec 17 2019 at 14:10)</a>:</h4>
<p>That's awesome!</p>



<a name="183651262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651262">(Dec 17 2019 at 14:11)</a>:</h4>
<p>I hope it's possible to integrate query key generation with the existing machinery in <code>ty::print</code></p>



<a name="183651273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651273">(Dec 17 2019 at 14:11)</a>:</h4>
<p>(while still making use of string sharing)</p>



<a name="183651338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651338">(Dec 17 2019 at 14:12)</a>:</h4>
<p>that would probably give us rather high-fidelity query keys</p>



<a name="183651394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651394">(Dec 17 2019 at 14:12)</a>:</h4>
<p>I'm not sure if I'll get around to implementing that before the holidays</p>



<a name="183651408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651408">(Dec 17 2019 at 14:13)</a>:</h4>
<p>Would that be similar to the <code>Debug</code> presentation for query keys or something else?</p>



<a name="183651431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651431">(Dec 17 2019 at 14:13)</a>:</h4>
<p>It should be similar to what one gets in error messages</p>



<a name="183651460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651460">(Dec 17 2019 at 14:13)</a>:</h4>
<p>Very cool!</p>



<a name="183651462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651462">(Dec 17 2019 at 14:13)</a>:</h4>
<p>symbol name generation is also based on it</p>



<a name="183651525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651525">(Dec 17 2019 at 14:14)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> has done a great job at making things generic there</p>



<a name="183651541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651541">(Dec 17 2019 at 14:14)</a>:</h4>
<p>but I don't have any experience with it</p>



<a name="183651569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651569">(Dec 17 2019 at 14:14)</a>:</h4>
<p>lmk if there's anything I can do to help!</p>



<a name="183651607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651607">(Dec 17 2019 at 14:15)</a>:</h4>
<p>I suspect we may need to update some of the measureme tools to take better advantage of the data</p>



<a name="183651853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651853">(Dec 17 2019 at 14:18)</a>:</h4>
<p>yeah, some of the tools can make good use of query keys (e.g. crox?)</p>



<a name="183651859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183651859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183651859">(Dec 17 2019 at 14:18)</a>:</h4>
<p>/me needs to run ...</p>



<a name="183659014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183659014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183659014">(Dec 17 2019 at 15:32)</a>:</h4>
<p><code>ty::print</code> is nowhere near what I was hoping it would be tbh</p>



<a name="183659041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183659041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183659041">(Dec 17 2019 at 15:32)</a>:</h4>
<p>if you have ideas for how to improve its design, I'm all ears</p>



<a name="183659123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183659123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183659123">(Dec 17 2019 at 15:33)</a>:</h4>
<p>(it's plausible <code>ty::print</code> itself is pointless since most of the logic can be replicated without too much effort, and <code>ty::print::pretty</code> should be the only part that's actually abstracted, which would allow a nice abstraction overall)</p>



<a name="183688023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183688023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183688023">(Dec 17 2019 at 20:28)</a>:</h4>
<p>I've been browsing through ty::print for a bit just now and it looks very useful. The logic in the default methods seems rather sophisticated. I'd rather not try to duplicate that without good reason.</p>



<a name="183688145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/query%20keys%20.../near/183688145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/query.20keys.20.2E.2E.2E.html#183688145">(Dec 17 2019 at 20:30)</a>:</h4>
<p>I'll have another look tomorrow, specifically at what actual implementations of the trait look like</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>